package com.anuode.http;

import com.anuode.entity.Task;


/**
 * Created by xudong on 2015/3/19.
 */
public interface HttpUtils {
    /**
     * <br>A HttpGet what use JSON to build a Content and return a JSON  <br/>
     * <br>So , we can Serializable a Java Bean to a JSON  ,and we also can ReSerializable a return JSON to a Java Bean.<br/>
     * @param url
     * @param clazz
     * @param task
     * @return
     */
    public String httpGetJson(String url, final Class clazz, final Task task);

    /**
     * <br>A HttpGet what use JSON to build a Content and return a JSON  <br/>
     * @param url
     * @param clazz
     * @param task
     * @return
     */
    public String httpPostJson(String url, final Class clazz, final Task task);

    /**
     * <br>The Real Http <br/>
     * @param url
     * @param type
     * @param clazz
     * @param task
     * @return
     */
    public String http(String url, int type, final Class clazz, final Task task);

//    public String postFile(String url,Map<String ,String> params,String fileParName,String file)throws Exception;
}
